<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>事件绑定传递参数</title>
</head>
<body>
<div id="app">
  {{num}}<br>
  <button v-on:click="add(1)">加</button>
  <button @click="subtract(1)">减</button>
</div>
 <script src="./vue.global.js"></script>
<script>
  const vue=Vue.createApp({
    data(){
      return{
        num:1
      }
    },
    methods:{
      add(value){
        this.num +=value;
      },
       subtract(value){
          this.num -=value;
       }
    }
  }).mount('#app');
</script>
</body>
</html>